package com.cheyun.netsalev3.bean;

import android.widget.ImageView;

import androidx.annotation.DrawableRes;
import androidx.databinding.BindingAdapter;

public class HomeAppParam {
    private final String name;
    private int drawable;
    public HomeAppParam(String name) {
        this.name = name;
    }

    @DrawableRes
    public int getDrawable() {
        return drawable;
    }

    public void setDrawable(@DrawableRes int drawable) {
        this.drawable = drawable;
    }

    public String getName() {
        return name;
    }

    @BindingAdapter({"android:src"})
    public static void setImageViewResource(ImageView imageView, int resource) {
        imageView.setImageResource(resource);
    }
}
